import { getShopDetail } from "@/static/js/pointsMall.js";
export default {
	data() {
		return {
			shopId: '',
			shopObj: {},
			pageShow: false
		}
	},
	onLoad(e) {
		this.shopId = e.id
		this.getShopDetail()
	},
	methods: {
		//商品详情
		async getShopDetail() {
			let obj = {
				id: this.shopId
			}
			let res = await getShopDetail(obj)
			if (res.code === 1) {
				this.shopObj = res.data
				this.pageShow = true
			} else {
				this.$tools.msg(res.msg)
			}
		},

		goHome() {
			uni.navigateTo({
				url: '/pointsMall/index/index'
			})
		},

		goOrderDetail() {
			uni.navigateTo({
				url: '/pointsMall/exchangeMall/index?id=' + this.shopId
			})
		}
	}
}